﻿using System.Security.Cryptography;
using System.Text;

namespace Shows_3D
{
    public static class ShowsHelpers
    {
        public static string createMD5ByString(string str)
        {
            MD5 mD5 = new MD5CryptoServiceProvider();
            byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(str);
            byte[] hashBytes = mD5.ComputeHash(inputBytes);
            // Convert the byte array to hexadecimal string
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < hashBytes.Length; i++)
            {
                sb.Append(hashBytes[i].ToString("X2"));
            }
            return sb.ToString();
        }
    }
}